The present invention relates generally to motion control. More particularly, the present invention relates to a system wherein a motion control system uses pulses to instruct a motion device to move an object.
Motion control is a broad term that may be defined as the precise control of anything that moves. A motion system typically comprises five major components: 1) the moving mechanical device; 2) the motor (servo or stepper motor) with feedback and motion I/O; 3) the motor drive unit; 4) the intelligent controller; and 5) the programming/interface software. Scientists and engineers typically use servo and stepper motors for position and velocity control in a variety of electromechanical configurations.
In particular, stepper motor systems typically include a controller, a power drive, and a stepper motor. The controller is able to generate step pulses to command the drive to move the motor (and therefore the object that is desired to be moved) an incremental movement often called a xe2x80x9cstep.xe2x80x9d The drive accepts these pulses and generates the high currents and voltages necessary to move the motor. The frequency of the step pulses controls velocity, the rate of change controls acceleration, and the total number of pulses controls the position.
Prior motion control systems have used proprietary control hardware to control the motion system. These proprietary systems have suffered from high cost and limited flexibility. More recently, computer systems are being used in motion control systems. The computer system may serve as the operator interface or human machine interface (HMI) as well as the local control host in the remote system controller platform. The use of personal computers in motion control is widely accepted and growing at a significant pace. While many motion control solutions today still use standalone distributed motion control and closed architecture systems, computer-based motion solutions provide added flexibility and the potential for lower system cost.
In computer-based stepper motion control systems, it is common to segment the total motion into short time intervals. During each interval (i.e., each iteration of the loop), the controller decides where the motor should be at the end of the interval. The controller then outputs the number of step pulses equal to the difference between the target position and the current position. It is also common practice to evenly distribute the required number of pulses across the loop period. However, this even distribution can result in significant short-term velocity and position error.
For example, for a loop period of 10 clocks and a step rate of 7 clocks, steps may be generated as follows according to the prior art method:
Because the motion control systems of the prior art use integer values for steps, the instantaneous step rate (i.e., the step rate per period) is either 5 or 10 clocks even though the average step rate is 7 clocks. FIG. 4A illustrates a typical graph (of velocity versus time) having significant short-term error according to the prior art motion control system and method.
Prior art motion control systems also suffer from quantization errors, primarily because they can only output step rates that are an integer number of clock cycles. If a digital motion control system can only output step rates that are an integer number of clocks, for example, then it can only choose a step rate of 2 or 3 clocks (rather than an ideal 2.4 clocks, for example). If it uses a step rate of 2 clocks, then the pulse train will end early in the period and leave dead time that creates jumps in velocity. If it uses a step rate of 3 clocks, the pulse train will not finish by the end of the period and will run into the next period.
Therefore, an improved system and method is desired for motion control using improved pulse placement for smoother operation.
One embodiment of the present invention includes a motion control system and method which provides improved pulse placement for smoother operation of a motion device such as a stepper motor. Although prior art implementations typically do generate the correct number of steps at the correct average velocity, they do so at the expense of short-term error. At both high and low velocities, the motion control system and method as described herein will typically result in smoother operation as well as achieve positional accuracy through accurate pulse placement.
The motion device (e.g., a stepper motor) is operable to move an object. The motion device is coupled to a motion control system which may include a computer system and a motion controller. The motion control system may include a processor and a memory medium, wherein the memory medium stores a motion control software program which is executable by the processor. A power drive may be coupled between the motion device and the motion control system. The power drive may be operable to receive the pulses from the motion control system, translate the pulses into power signals, and send the power signals to the motion device.
In one embodiment, to achieve smoother operation, the motion control system and method may place the step pulses more accurately within the loop period. By using a delay time, the pulse train may be shifted to an arbitrary location within the loop period rather than evenly distributed throughout the loop period as in the prior art implementations.
In one embodiment, the motion control system and method may correct for quantization errors in the step generation due to digital clock limits. In one embodiment, the motion control system may generate a pulse train at the slower rate (3 clocks in this example) and correct for the xe2x80x9cborrowed timexe2x80x9d in the next loop iteration. Instead of assuming that each loop period is constant, according to one embodiment of the motion control system and method, an autocorrecting algorithm removes the borrowed time from its calculations and therefore allows the step generation to catch up at appropriate intervals.
In one embodiment, a further improvement may be made to improve the accuracy of the motion control system and method. By allowing the step rate to change at a programmable point in the middle of the loop iteration (i.e., the series of loop periods), the step pulse generator may allow the steps generated to consume only the loop period and thus eliminate the borrowing of time from future loop periods.